/*
 * RegistrationDate.h
 *
 *  Created on: 3 May 2010
 *      Author: Savramis Sartios
 */

#ifndef REGISTRATIONDATE_H_
#define REGISTRATIONDATE_H_
#include "IDate.h"
#include <stdlib.h>

/**
 * Date object which contains the day, the month and the year of registration creation
 */
class RegistrationDate : public IDate {
public:
	/**
	 * \param	registration in which the date will be added
	 * \param	day		in a number format
	 * \param	month 	in a number format
	 * \param	year	in a number format
	 */
	RegistrationDate(ICourseRegistration *registration,const string *day,const string *month,const string *year);
	virtual ~RegistrationDate();

	/**
	 * Sets the date
	 * \param	day		in a number format
	 * \param	month 	in a number format
	 * \param	year	in a number format
	 */
	virtual void		setDate(const string *day,const string *month,const string *year);

	/**
	 * Returns the date in dd/mm/yyyy format
	 */
	virtual	string	*	getDate()const;

/*	virtual void		setDay(const string *day);*/

	/**
	 * Returns the number of the day
	 * \return	day
	 */
	virtual string	*	getDay()const;

/*	virtual void		setMonth(const string *month);*/

	/**
	 * Returns the number of the month
	 * \return	month
	 */
	virtual	string	*	getMonth()const;

/*	virtual void		setYear(const string *year);*/

	/**
	 *	Returns the year
	 *	\return year
	 */
	virtual string	*	getYear()const;

	/**
	 *	Sets the owner of the registration
	 *	\param	owner's aem
	 */
	virtual void		setOwner(const string *owner);

	/**
	 * Returns the owner of the registration
	 * \return	the ower
	 */
	virtual string	*	getOwner()const;

private:
	/**
	 * Set day
	 * \param	day	in number format
	 * \throw	InvalidDay
	 */
	virtual void	setDay(const string *day);
	/**
	* Set month
	* \param	month	in number format
	* \throw	InvalidMonth
	*/
	virtual void	setMonth(const string *month);
	/**
	* Set year
	* \param	year	in number format
	* \throw	InvalidYear
	*/
	virtual void	setYear(const string *year);

	string * day_;
	string * month_;
	string * year_;
};

#endif /* REGISTRATIONDATE_H_ */
